package cn.tedu.rabbitmqspring.m1;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Produer {
    @Autowired
    private AmqpTemplate t;

    //发送消息的方法
    public void send(String s){
        t.convertAndSend("helloworld",s);
    }
}
